#include "mainwindow.h"
#include "ui_mainwindow.h"
//#include <QDialog>
#include <dialog.h>
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::on_pushButton_clicked()
{
//    QDialog* dialog = new QDialog(this);
//    dialog->setWindowTitle("对话框标题");
//    dialog->setAttribute(Qt::WA_DeleteOnClose);
//    dialog->resize(400,300);

//    dialog->show();

    Dialog* dialog = new Dialog();
    dialog->setAttribute(Qt::WA_DeleteOnClose);
    dialog->resize(400,300);

    dialog->show();

}
